{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a=2\n",
      "b=3\n",
      "c=4\n",
      "['无解']\n"
     ]
    }
   ],
   "source": [
    "a=float(input(\"a=\"))\n",
    "b=float(input(\"b=\"))\n",
    "c=float(input(\"c=\"))\n",
    "def f(a,b,c):\n",
    "    delta=(b**2)-4*a*c\n",
    "    if delta<0:\n",
    "        return ['无解']\n",
    "    else:\n",
    "        \n",
    "        return[(-b+(b**2-4*a*c)**0.5)/(2*a),(-b-(b**2-4*a*c)**0.5)/(2*a)]\n",
    "print(f(a,b,c))\n",
    "    \n",
    "        \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
